﻿using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.Networking;

public class LobbyPlayer : NetworkBehaviour {

    [SyncVar(hook = "UpdateNickName")] public string nickName;
    [SyncVar(hook = "UpdateGameState")] public int gameState;

    public SpriteRenderer sp;
    public TextMeshPro tmpNickName;

    public void UpdateNickName(string nickName_) {
        tmpNickName.text = nickName_;
    }
    public void UpdateGameState(int gameState_) {
        // Debug.Log(gameState_);
        if (GameStateMsgType.NOT_READY == gameState_) {
            // 播放取消准备状态的特效
        } else if (GameStateMsgType.READY == gameState_) {
            // 播放进入准备状态的特效
        } else { 
            // 播放进入游戏状态的特效
        }
    }
}
